wait_timeout = "20"
NB_ctwing_cmd = [
    {
        "cmd": 'AT+MKCDP=192.168.1.5,5683',
        "match": 'AT\+MKCDP=192.168.1.5,5683\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKCDP?',
        "match": 'AT\+MKCDP\?\s{2}\+MKCDP:[\d\.]+,\d+\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKCDP=?',
        "match": 'AT\+MKCDP=\?\s{2}\+MKCDP:<[\w\_]+>,<\w+>\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKCMS=?',
        "match": 'AT\+MKCMS=\?\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKNMI=2',
        "match": 'AT\+MKNMI=2\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKNMI=0',
        "match": 'AT\+MKNMI=0\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKNMI=1',
        "match": 'AT\+MKNMI=1\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKNMI?',
        "match": 'AT\+MKNMI\?\s{2}\+MKNMI:\d\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKNMI=?',
        "match": 'AT\+MKNMI=\?\s{2}\+MKNMI:\(\d,\d,\d\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKMGR=?',
        "match": 'AT\+MKMGR=\?\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKQMGR',
        "match": 'AT\+MKQMGR\s{2}\w+\=\d,\w+\=\d,\w+\=\d\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKQMGR=?',
        "match": 'AT\+MKQMGR=\?\s{2}\w+\=<\w+>,\w+\=<\w+>,\w+\=<\w+>\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKACONFIG=221.229.214.202,5683,3600',
        "match": 'AT\+MKACONFIG=221.229.214.202,5683,3600\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKACONFIG?',
        "match": 'AT\+MKACONFIG\?\s{2}\+MKACONFIG:[\d\.]+,\d+,\d+\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKACONFIG=?',
        "match": 'AT\+MKACONFIG=\?\s{2}\+MKACONFIG:<\w+>,<\w+>,<\w+>\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKAREG',
        "match": 'AT\+MKAREG\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    # {
    #     "cmd": 'AT+MKAREG=1',
    #     "match": 'AT\+MKAREG=1\s{2}OK\s{2}',
    #     "wait": b'OK',
    #     "timeout": wait_timeout
    # },
    {
        "cmd": 'AT+MKAREG=?',
        "match": 'AT\+MKAREG=\?\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKADEREG',
        "match": 'AT\+MKADEREG\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKADEREG=?',
        "match": 'AT\+MKADEREG=\?\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKAUPDATE=?',
        "match": 'AT\+MKAUPDATE=\?\s{2}\+MKAUPDATE:<\w+>,<\w+>\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKAADDOBJ=19,2',
        "match": 'AT\+MKAADDOBJ=19,2\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKAADDOBJ=?',
        "match": 'AT\+MKAADDOBJ=\?\s{2}\+MKAADDOBJ:<\w+>,<\w+>,<\w+>,<\w+>,<\w+>,<\w+>\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKADELOBJ=19',
        "match": 'AT\+MKADELOBJ=19\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKADELOBJ=?',
        "match": 'AT\+MKADELOBJ=\?\s{2}\+MKADELOBJ:<\w+>\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKARDRSP=?',
        "match": 'AT\+MKARDRSP=\?\s{2}MKARDRSP:<\w+>,<\w+>\[,<\w+>,<\w+>,<\w+>,<\w+>,<\w+>,<\w+>,<\w+>,<\w+>\]\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKAWRRSP=?',
        "match": 'AT\+MKAWRRSP=\?\s{2}\+MKAWRRSP:<\w+>,<\w+>\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKAEXERSP=?',
        "match": 'AT\+MKAEXERSP=\?\s{2}\+MKAEXERSP:<\w+>,<\w+>,<\w+>\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKAOBSRSP=?',
        "match": 'AT\+MKAOBSRSP=\?\s{2}\+MKAOBSRSP:<\w+>,<\w+>\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKANOTIFY=?',
        "match": 'AT\+MKANOTIFY=\?\s{2}\+MKANOTIFY:<\w+>,<\w+>,<\w+>,<\w+>,<\w+>,<\w+>,<\w+>,<\w+>,<\w+>\[,<\w+>\]\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKMSTATUS?',
        "match": 'AT\+MKMSTATUS\?\s{2}\+MKMSTATUS:<\w+>\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKMSTATUS=?',
        "match": 'AT\+MKMSTATUS=\?\s{2}\+MKMSTATUS:<\w+>,<[\w\_]+>,<\w+>,<\w+>,<[\w\_]+>,<\w+>,<\w+>,<\w+>,<[\w\_]+>,<[\w\_]+>,<[\w\_]+>,<[\w\_]+>,<[\w\_]+>\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },

]